package com.zhiyou100.crm.service.impl;

import com.zhiyou100.crm.dao.CustomerStateDao;
import com.zhiyou100.crm.service.CustomerStateService;
import com.zhiyou100.crm.pojo.Customer;
import com.zhiyou100.crm.pojo.CustomerState;
import com.zhiyou100.crm.util.S_session;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.io.IOException;
import java.sql.ResultSet;
import java.util.List;
@Service("customerStateServiceImpl")
public class CustomerStateServiceImpl implements CustomerStateService {
//    CustomerStateDao customerStateDao=new CustomerStateDaoImpl();
    @Autowired
    private CustomerStateDao customerStateDao;
    @Override
    public List<CustomerState> query() throws IOException {
        List<CustomerState> customerStates =customerStateDao.query();
        return customerStates;
    }

    @Override
    public int delete(int id) throws IOException {
        int a =customerStateDao.delete(id);
        return a;
    }

    @Override
    public int update(CustomerState customerState) throws IOException {
        int a =customerStateDao.update(customerState);
        return a;
    }

    @Override
    public int insert(CustomerState customerState) throws IOException {
        int a =customerStateDao.insert(customerState);
        return a;
    }
}
